import {GInfoWindow} from "@/utils/gaode";
import InfoWindow from "@/components/InfoWindow.vue";
import {gMap} from "@/gaode";

const createInfoWindow = (num) => {

    let gInfoWindow = new GInfoWindow(InfoWindow);
    gInfoWindow.createApp({
        template: `
          <comp :numB="num"/>`,
        data: {
            num,
        },
        methods: {
            add() {
                this.num++;
            }
        }
    })
    gInfoWindow.infoWindow.open(gMap.map, gMap.map.getCenter())

    return gInfoWindow;
}


export default createInfoWindow
